package com.icode.syn.ticketSale;

/**
 * @Author: my_code
 * @Create: 2020-12-09 17:40
 */
public class Ticket {
    private int num = 30;

    public void sale() {
        if (num > 0) {
            System.out.println(Thread.currentThread().getName() + "拿到了第" +
                    num-- + "张票");
        }
    }
}
